package com.richard.room.app.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;
import androidx.room.TypeConverters;

import com.richard.room.app.DataConverter;
import com.richard.room.app.UserDTO;
import com.richard.room.operator.annotation.Description;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * @author: Richard
 * @createDate: 2023/8/7 14:04
 * @version: 1.0
 * @description: 描述
 */
@Entity(tableName = "tb_user")
@Description("用户表")
@TypeConverters(DataConverter.class)
public class User implements Serializable {

    @PrimaryKey(autoGenerate = true)
    private long id;

    @ColumnInfo(name = "user_name")
    private String name;

    @ColumnInfo(defaultValue = "10")
    private int age;

    @ColumnInfo(defaultValue = "0")
    private long update_time;

    private String address;

    private boolean sex;

    private Date birthday;

    private List<UserDTO> userDTO;

    public long getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(long update_time) {
        this.update_time = update_time;
    }

    public List<UserDTO> getUserDTO() {
        return userDTO;
    }

    public void setUserDTO(List<UserDTO> userDTO) {
        this.userDTO = userDTO;
    }

    public boolean isSex() {
        return sex;
    }

    public void setSex(boolean sex) {
        this.sex = sex;
    }

    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public Date getBirthday() {
        return birthday;
    }

    public void setBirthday(Date birthday) {
        this.birthday = birthday;
    }
}
